package com.atguigu.gmall.feign.order;

import com.atguigu.gmall.common.result.Result;
import com.atguigu.gmall.order.entity.OrderInfo;
import com.atguigu.gmall.order.vo.OrderConfirmVo;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

@FeignClient(value = "service-order")
public interface OrderFeignClient {

    @GetMapping(value = "/api/inner/order/trade")
    public Result<OrderConfirmVo> trade() ;

    @GetMapping(value = "/api/inner/order/findByOrderId/{orderId}")
    public Result<OrderInfo> findByOrderId(@PathVariable(value = "orderId")String orderId) ;

    @PostMapping(value = "/api/inner/order/saveOrderInfo")
    public Result<String> saveOrderInfo(@RequestBody OrderInfo orderInfo) ;

}
